<?php /** @noinspection PhpMissingFieldTypeInspection */

/** @noinspection PhpPropertyOnlyWrittenInspection */

namespace Dreamcat\Class2Array\DemoClass;

use DreamCat\Array2Class\Annotation\ObjectAttribute;

/**
 * 测试用的子类
 * @author vijay
 */
class Child extends ParentClass
{
    /** @var mixed */
    private $cf1;
    /** @var mixed */
    private $sharePrivate;
    /** @var mixed */
    #[ObjectAttribute("share_public")]
    public $sharePublic;

    /**
     * Child constructor.
     * @param mixed $field1 赋值给父类的$field1
     * @param mixed $pv2 赋值给$sharePrivate
     * @param mixed $pv3 赋值给$sharePublic
     * @param mixed|string $cf1 赋值给子类的$cf1
     */
    public function __construct($field1 = 10, $pv2 = "pv2", $pv3 = "", mixed $cf1 = "")
    {
        parent::__construct($field1, $pv2, $pv3);
        $this->cf1 = $cf1;
        $this->sharePrivate = $pv2 . "::child";
        $this->sharePublic = $pv3 . "::child";
    }
}

# end of file
